<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
  	<base href="<%=basePath%>">
    <meta charset="utf-8">
    <title>添加部门</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="stylesheets/theme.css">
    <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">

    <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
	// 验证输入不为空的脚本代码
	function checkForm(form) {
		if (form.dname.value == "") {
			alert("部门名称不能为空!");
			form.dname.focus();
			return false;
		}
		alert("添加部门成功！");
		return true;
	}
	</script>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
  </head>

  <body> 
	 <div class="content">  
        <div class="header">      
            <h1 class="page-title">添加部门</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="index.html">主页</a> <span class="divider">/</span></li>
            <li><a href="<%=basePath%>department/list">部门列表</a> <span class="divider">/</span></li>
            <li class="active">添加部门</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                    
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">Profile</a></li>
      <!--<li><a href="#profile" data-toggle="tab">Password</a></li>-->
    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
    	<form id="tab" action="<%=basePath%>servlet/DeptServlet?mark=insert" method="post" onsubmit="return checkForm(this);">
        	<label>部门编号</label>
        	<input type="text" id="dno" name="dno" value="" class="input-xlarge"/>
        	<label>部门名称</label>
        	<input type="text" id="dname" name="dname" value="" class="input-xlarge"/>
        	<label>部门描述</label>
        	<textarea id="ddesc" name="ddesc" rows="" class="input-xlarge"></textarea><br/>
        	<input type="submit" name="" class="btn btn-primary" value="保存"/>
    	</form>
      </div>
      <div class="tab-pane fade" id="profile">
      </div>
  </div>

</div>


                    
            </div>
        </div>
    </div>
    


    <script src="js/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">

        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });       
    </script>
    
  </body>
</html>
